/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Commons.Replicazione;
import Commons.WorkerDescriptor;
import Discovery.WorkerDiscovery;
import java.util.ArrayList;
import java.util.HashMap;

/**
 *
 * @author Team5
 */
public class StatoDiscovery {
    private String id;
    private ArrayList <WorkerDescriptor>workers;
    private HashMap<Integer,Integer> vectorClockl;
    private int PosizionedelvectorClockl;
    private HashMap<Integer,Integer> vectorClocklq;
    private int PosizionedelvectorClocklq;
    private int NumeroTotaleElementiInseriti;

    public StatoDiscovery() {
    }
    public void aggiornaStato(WorkerDiscovery d){
    this.id=d.getID();
    this.workers=d.getWorkers();
    this.vectorClockl=d.getL().getVectorClock();
    this.PosizionedelvectorClockl=d.getL().getPosizioneNelVC();
    this.vectorClocklq=d.getLq().getVectorClock();
    this.PosizionedelvectorClocklq=d.getLq().getPosizioneNelVC();
    }

    public int getNumeroTotaleElementiInseriti() {
        return NumeroTotaleElementiInseriti;
    }

    public void setNumeroTotaleElementiInseriti(int NumeroTotaleElementiInseriti) {
        this.NumeroTotaleElementiInseriti = NumeroTotaleElementiInseriti;
    }

    public int getPosizionedelvectorClockl() {
        return PosizionedelvectorClockl;
    }

    public void setPosizionedelvectorClockl(int PosizionedelvectorClockl) {
        this.PosizionedelvectorClockl = PosizionedelvectorClockl;
    }

    public int getPosizionedelvectorClocklq() {
        return PosizionedelvectorClocklq;
    }

    public void setPosizionedelvectorClocklq(int PosizionedelvectorClocklq) {
        this.PosizionedelvectorClocklq = PosizionedelvectorClocklq;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public HashMap<Integer, Integer> getVectorClockl() {
        return vectorClockl;
    }

    public void setVectorClockl(HashMap<Integer, Integer> vectorClockl) {
        this.vectorClockl = vectorClockl;
    }

    public HashMap<Integer, Integer> getVectorClocklq() {
        return vectorClocklq;
    }

    public void setVectorClocklq(HashMap<Integer, Integer> vectorClocklq) {
        this.vectorClocklq = vectorClocklq;
    }

    public ArrayList<WorkerDescriptor> getWorkers() {
        return workers;
    }

    public void setWorkers(ArrayList<WorkerDescriptor> workers) {
        this.workers = workers;
    }


}

